package org.example.demo3.demos.web.exception;

import lombok.Getter;
import org.example.demo3.demos.web.common.ResponseEnum;

@Getter
public class BusinessException extends RuntimeException {
    private String code;
    private String msg;

    public BusinessException(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(ResponseEnum responseEnum) {
        this.code = responseEnum.getCode();
        this.msg = responseEnum.getMsg();
    }
}
